﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using PBOffice.Models;
namespace PBOffice.DAL
{
    public class MeetingInfoService
    {
        public List<MeetingInfo> GetAllMeetingInfo()
        {
            List<MeetingInfo> list = new List<MeetingInfo>();
            string sql = "select * from MeetingInfo ";
            using (SqlDataReader dr = SqlHelp.ExecuteReader(SqlHelp.connectionstring, CommandType.Text, sql))
            {
                while (dr.Read())
                {
                    MeetingInfo info = new MeetingInfo();
                    info.MeetingId = (int)dr["MeetingId"];
                    info.MeetingName = dr["MeetingName"].ToString();
                    list.Add(info);
                }
            }
            return list;
        }
    }
}
